package com.htthorizon.neo4j.repository;

import com.htthorizon.neo4j.entity.Model;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Brilliant
 */
@Repository
public interface ModelRepository extends Neo4jRepository<Model, Long> {

    @Query("MATCH (d:Model) WHERE d.name CONTAINS $name RETURN d")
    List<Model> findByName(@Param("name") String name);


}
